package o;

import android.app.Activity;
import android.content.Context;
import android.os.AsyncTask;
import android.text.TextUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;

public class exz extends AsyncTask<Void, Void, cxx> {
    private WeakReference<Activity> ˊ;
    private String ˋ;
    private a ˎ;

    public interface a {
        void ˏ(cxx o_cxx);
    }

    protected /* synthetic */ Object doInBackground(Object[] objArr) {
        return ˏ((Void[]) objArr);
    }

    protected /* synthetic */ void onPostExecute(Object obj) {
        ˋ((cxx) obj);
    }

    public exz(Activity activity, String str, a aVar) {
        this.ˊ = new WeakReference(activity);
        this.ˋ = str;
        this.ˎ = aVar;
    }

    protected cxx ˏ(Void... voidArr) {
        List<cxx> arrayList = new ArrayList();
        fhz ˋ = fho.ˏ().ˋ("ShortcutManager");
        if (ˋ == null || this.ˊ == null || this.ˊ.get() == null) {
            return null;
        }
        ((cyf) ˋ.ॱ(cyf.class)).ˊ((Context) this.ˊ.get(), arrayList);
        for (cxx o_cxx : arrayList) {
            if (!TextUtils.isEmpty(o_cxx.ॱ()) && o_cxx.ॱ().equals(this.ˋ)) {
                return o_cxx;
            }
        }
        return null;
    }

    protected void ˋ(cxx o_cxx) {
        if (this.ˎ != null) {
            this.ˎ.ˏ(o_cxx);
        }
    }
}
